<!--
 * @Author: your name
 * @Date: 2020-07-28 11:52:33
 * @LastEditTime: 2020-08-11 10:09:10
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /website/src/pages/productList.vue
--> 
<template>
  <div>
    <div class="container">
      <div class="product-content">
        <left-side-bar :title="title" :contact="contact">
          <!-- <slot name="currentTitle"></slot> -->
          <template v-slot:currentTitle>
            <p>企业新闻</p>
            <p>公司新闻</p>
            <p>行业新闻</p>
          </template>
        </left-side-bar>
        <div class="product-content_right">
          <p class="current-position">
            <span>当前所在位置:</span>
            <span>
              首页
              <i class="icon-arrow">>>></i>
            </span>
            <span>{{title}}</span>
          </p>
          <div class="product-item">
            
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import axios from 'axios'
import Qs from 'qs'
import LeftSideBar from '../components/LeftSideBar'

export default {
  name: 'about',
  components: {
    LeftSideBar
  },
  data () {
    return {
      title: '',
      type: '',
      info: {},
      contact: {}
    }
  },
  mounted() {
    /* eslint-disable */
    this.title = this.$route.params.title || '公司简介'
    this.type = this.$route.query.type
    this.contact = JSON.parse(window.localStorage.getItem('homeData')).sysContact || {}
    console.log(this.contact)
    this.init(this.type)
  },
  methods: {
    init() {
      axios.post('/introductionInfo', Qs.stringify({
        type: this.type
      })).then(res => {
        /* eslint-disable */
        console.log(res)
        this.info = res.data
      })
    }
  }
}
</script>

<style lang="scss" scoped>
  .product-content{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 15px 0;
    .product-content_right{
      flex-grow: 1;
      margin-left: 35px;
      align-items: center;
      .current-position{
        padding: 5px 0;
        font-size: 14px;
        border-bottom: 1px solid #888;
        span{
          .icon-arrow{
            margin: 0 10px;
          }
        }
      }
      .product-item{
        width: 100%;
        font-size: 14px;
        color: #666;
        margin-top: 20px;
      }
    }
  }
</style>
